package com.qilin.hscs.hm.util;

import com.alibaba.fastjson.JSON;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by 10188 on 2018/4/18.
 */
public class MqttResultUtil {

    public static String  getResult(int cmd, int rsp, Object data) {
        Map<String, Object> result = new HashMap<>(4);
        result.put("cmd", cmd);
        result.put("rsp", rsp);
        result.put("data", data);
        return JSON.toJSONString(result);
    }
}
